package cn.songhaiqing.walle.help;

import android.content.Context;
import android.widget.Toast;

public class ToastHelper {
    private static ToastHelper helper;
    private Context context;
    private Toast mToast;

    private ToastHelper(Context context2) {
        this.context = context2;
        this.mToast = Toast.makeText(context2, "", 0);
    }

    public static ToastHelper getInstance(Context context2) {
        if (helper == null) {
            helper = new ToastHelper(context2);
        }
        return helper;
    }

    public void showToast(String message) {
        this.mToast.setText(message);
        this.mToast.show();
    }

    public void cancle() {
        if (this.mToast != null) {
            this.mToast.cancel();
        }
    }
}
